#@layout()

#define js()
    <script>
    $(function(){
        var _table;
        _table =$("#fairwithdraw-list").DataTable( {
            aLengthMenu:[10,20,50],
            "processing": true,
            "serverSide": true,
            "bLengthChange": false,
            "bSort":false,
            searching: false,//屏蔽datatales的查询框
            "pagingType":   "full_numbers",
            "ajax":{
                "url": "/admin/fairwithdraw/listAll",
                "type": "post",
                "data": function (params) {
                        params["fairWithdraw.status"]=$("#status").val();
                }
            },
            "columns": [
                    { "data": "id" },
                    { "data": "wh_id" },
                    { "data": "bank_id" },
                    { "data": "money" },
                    { "data": "platform_fee" },
                    { "data": "create_time" },
                    { "data": "status" },
                    { "data": "balance" },
                    { "data": "avaliable_fee" },
                    { "data": "real_name" },
                { "data": function(data){
                    var opt="<a href='javascript:;' onclick='pass("+data.id+")'>处理成功</a>"+"|";
                     opt+="<a href='javascript:;' onclick='refuse("+data.id+")'>处理失败|</a>";
                     opt+="<a href='javascript:;' onclick='log("+data.id+")'>查看日志</a>";
                    return opt;
                }
                }
            ]
        } );
        $("#searchBtn").click(function(){
            _table.ajax.reload();
        });
});
    /*编辑*/
    function edit(id){
        var title="编辑";
        var url="#(contextPath)/admin/fairwithdraw/queryById?id="+id;
        var w="";
        var h=510;
        layer_show(title,url,w,h);
    }
    /*添加*/
    function add(){
        var title="添加";
        var url="#(contextPath)/admin/fairwithdraw/add/";
        var w="";
        var h=510;
        layer_show(title,url,w,h);
    }

    /*删除*/
    function del(id){
        var config = {
        "url":"#(contextPath)/admin/fairwithdraw/deleteById?id="+id,
        data:{}
        };
        var backendTool = new BackendTool(config);
        backendTool.ajaxRequest();
    }
    
    /*查看详情*/
    function showdetail(id){
        var title="查看详情";
        var url="#(contextPath)/admin/fairwithdraw/showDetail?id="+id;
        var w="";
        var h=510;
        layer_show(title,url,w,h);
    }
    
    
    /*审核通过*/
    function pass(id){
        var config = {
        "url":"#(contextPath)/admin/fairwithdraw/pass?id="+id,
        data:{}
        };
        var backendTool = new BackendTool(config);
        backendTool.ajaxRequest();
    }
    
    
    /*拒绝对话框*/
    function refuse(id){
        var title="操作日志";
        var url="#(contextPath)/admin/fairwithdraw/toRefuse?id="+id;
        var w="";
        var h=510;
        layer_show(title,url,w,h);
    }
    
    /*操作日志*/
    function log(id){
        var title="操作日志";
        var url="#(contextPath)/admin/opertion/queryLog?id="+id+"&taskType=6";
        var w="";
        var h=510;
        layer_show(title,url,w,h);
    }
    
    </script>
#end

#define main()
    #@breadcrumb(["网红管理","网红提现管理列表"])
   <div class="page-container">
       <div class="text-c">
       		提现申请状态：
           <span class="select-box inline">
				<select name="fairWithDraw.status" class="select" id="status">
					<option value="-1">==请选择==</option>
					<option value="1">等待处理</option>
					<option value="2">处理成功</option>
					<option value="3">处理失败</option>
				</select>
			</span>
           <button name="" id="searchBtn" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i>检索</button>
       </div>
       <div class="cl pd-5 bg-1 bk-gray mt-20">
       		<span style="color:red">【温馨提醒】<br/>
       			平台服务费用会在当你将指定提现记录为【处理成功】后自动从提现金额中扣除，系统会做对应的流水记录
       		</span>
       </div>
       <div class="mt-20">
           <table class="table table-border table-bordered table-bg table-hover table-sort" id="fairwithdraw-list">
               <thead>
               <tr class="text-c">
                     <th>ID</th>
                     <th>网红昵称</th>
                     <th>所属银行</th>
                     <th>提现金额（元）</th>
                     <th>平台服务费（元）</th>
                     <th>提交时间</th>
                     <th>状态</th>
                     <th>余额（元）</th>
                     <th>可用余额（元）</th>
                     <th>真实姓名</th>
                   	 <th>操作</th>
               </tr>
               </thead>
               <tbody>
               </tbody>
           </table>
       </div>
   </div>
#end